package org.rednebula.framework.core.model.domain;

import org.rednebula.framework.core.IEnvironment;
import org.rednebula.framework.core.utils.ExtendsStringUtils;

public class ModelFactory {
	
	public static <T> T getModel(Class<T> cls,IEnvironment env){
		return (T)env.lookup(ExtendsStringUtils.toLowerInitName(cls));
	}
	
	
	public static <T> T getModel(String name,IEnvironment env){
		return (T)env.lookup(name);
	}
}
